﻿<%@ Page Title="" Language="vb" AutoEventWireup="false" MasterPageFile="~/MainPage.Master"
	CodeBehind="ViewStatusRegister.aspx.vb" Inherits="RWN.ViewStatusRegister" UICulture="th-TH" Culture="th-TH" %>
	
<%@ MasterType VirtualPath="~/MainPage.Master" %>
<%@ Register Assembly="Sarayut.ControlLibrary" Namespace="Sarayut.ControlLibrary"
	TagPrefix="cc1" %>
<%@ Register src="ucCalendar.ascx" tagname="ucCalendar" tagprefix="uc1" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
	<span class="wrap">
		<div>
			<table width="100%" cellpadding="0" cellspacing="0" class="profile" bgcolor="#FFFFFF">
				<tr>
					<td width="20%" bgcolor="#E0E0E0">
					  <asp:ScriptManager ID="ScriptManager1" runat="server" 
							EnableScriptGlobalization="True">
						</asp:ScriptManager>
					 Report Register Online Page
					</td>
				</tr>
				<tr>
					<td>
						<hr />
					</td>
				</tr>
				<tr>
					<td>
						<table>
							<tr>
								<td width="20%" bgcolor="#E0E0E0">
									ชื่อ-นามสกุล (ไทย):
								</td>
								<td>
									<asp:TextBox ID="txtNameTh" runat="server" Width="250px"></asp:TextBox>
								</td>
								<td width="20%" bgcolor="#E0E0E0">
									รหัสนักธุรกิจ:
								</td>
								<td>
									<asp:TextBox ID="txtAppId" runat="server" Width="150px"></asp:TextBox>
								</td>
							</tr>
							<tr>
								<td width="20%" bgcolor="#E0E0E0">
									ตั้งแต่วันที่:
								</td>
								<td>
									<uc1:ucCalendar ID="ccFrom" runat="server" />
								</td>
								<td width="20%" bgcolor="#E0E0E0">
									ถึงวันที่:
								</td>
								<td>
									<uc1:ucCalendar ID="ccTo" runat="server" />
								</td>
							</tr>
							<tr>
								<td colspan="4" style="text-align: right">
									<asp:Button ID="btnSearch" runat="server" Text="ค้นหา" Width="80px" />
									&nbsp;<asp:Button ID="btnReset" runat="server" Text="ตั้งค่าใหม่" Width="80px" />
									&nbsp;<asp:Button ID="btnExcel" runat="server" Text="Excel File" Width="80px" />
									&nbsp;<asp:Button ID="btnPDF" runat="server" Text="PDF File" Width="80px" />
								</td>
							</tr>
						</table>
					</td>
				</tr>
			</table>
		</div>
		<div>
			<asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" 
				Visible="False">
				<Columns>
					<asp:BoundField DataField="orderno" HeaderText="ลำดับ" />
					<asp:BoundField DataField="officer_app_id" HeaderText="รหัสนักธุรกิจ" />
					<asp:BoundField DataField="OFFICER_FIRSTNAME_THA" HeaderText="ชื่อนักธุรกิจ" />
					<asp:BoundField DataField="OFFICER_LASTNAME_THA" 
						HeaderText="นามสกุลนักธุรกิจ" />
					<asp:BoundField DataField="offcier_member_date" 
						HeaderText="วันที่สมัครออนไลน์" />
					<asp:BoundField DataField="OFFICER_STATUS" HeaderText="สถานภาพ" />
					<asp:BoundField DataField="OFFICER_REMARK" HeaderText="หมายเหตุ" />
				</Columns>
			</asp:GridView>
			<asp:GridView ID="gvList" runat="server" AllowPaging="True" 
				AutoGenerateColumns="False" PageSize="20" Width="100%" 
				DataKeyNames="OFFICER_ID">
				<AlternatingRowStyle BackColor="White" />
				<Columns>
					<%--<asp:CommandField SelectText="เลือก" ShowSelectButton="True">
						<ItemStyle HorizontalAlign="Center" />
					</asp:CommandField>--%>
					<asp:TemplateField>
						<ItemTemplate>
							<asp:HyperLink ID="HyperLink1" runat="server" NavigateUrl='<%# EncyId(Eval("officer_id")) %>' 
								Text="เลือก" Target="_blank"></asp:HyperLink>
						</ItemTemplate>
					</asp:TemplateField>
					<asp:BoundField DataField="orderno" HeaderText="ลำดับ">
						<ItemStyle HorizontalAlign="Center" />
					</asp:BoundField>
					<asp:BoundField DataField="officer_app_id" HeaderText="รหัสนักธุรกิจ">
						<ItemStyle HorizontalAlign="Center" />
					</asp:BoundField>
					<asp:TemplateField HeaderText="ชื่อนักธุรกิจ">
						<ItemTemplate>
							<asp:Label ID="Label1" runat="server" Text='<%# Eval("OFFICER_FIRSTNAME_THA") & " " & Eval("OFFICER_LASTNAME_THA") %>'></asp:Label>
						</ItemTemplate>
						<EditItemTemplate>
							<asp:TextBox ID="TextBox1" runat="server"></asp:TextBox>
						</EditItemTemplate>
					</asp:TemplateField>
					<asp:BoundField DataField="offcier_member_date" DataFormatString="{0:dd/MM/yyyy}"
						HeaderText="วันที่สมัครออนไลน์">
						<ItemStyle HorizontalAlign="Center" />
					</asp:BoundField>
					<asp:TemplateField HeaderText="สถานภาพ">
						<ItemTemplate>
							<asp:Label ID="Label2" runat="server" Text='<%# ConvertStatus(Eval("OFFICER_STATUS")) %>'></asp:Label>
						</ItemTemplate>
						<ItemStyle HorizontalAlign="Center" />
					</asp:TemplateField>
					<asp:BoundField HeaderText="หมายเหตุ" DataField="OFFICER_REMARK" />
				</Columns>
				<HeaderStyle BackColor="White" Height="30px" />
				<PagerStyle BackColor="White" />
				<RowStyle Height="20px" />
			</asp:GridView>
		</div>
	</span>
</asp:Content>
